<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* 1.创建一个数组 */
        var arr=[1,2,3,4];
        /* 2.使用构造函数的方式创建一个数组 */
        var obj=new Array(1,2,3,4)
        console.log(arr);
        console.log(obj)
        /*  for in */
        for(var key in arr){
            console.log(arr[key])  //key:数组的下标 0 1 2 3  arr[key]:数组的值 1 2 3 4
        }
    </script>
</body>
</html>